//
//  QLPagerFragmentAdapter.h
//  QLSchool_IOS
//
//  Created by anan on 14-1-14.
//  Copyright (c) 2014年 baobaodev_anan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QLViewPager.h"
#import "QLFragment.h"

@class QLViewPager;

/**
 *  viewpager数据适配器，使用时实现某些方法即可
 */
@interface QLPagerFragmentAdapter : NSObject


@property (nonatomic,strong) UIViewController *viewController;

- (id)initWithViewController:(UIViewController*)viewController;

/**
 *  获取tab的个数
 *
 *  @return
 */
- (int)getCount;

/**
 *  获取指定tab的Fragment
 *
 *  @param viewPager
 *  @param position
 *
 *  @return
 */
- (QLFragment*)getFragment:(QLViewPager *)viewPager position:(int)position;

/**
 *  获取标题
 *
 *  @param viewPager
 *  @param position
 *
 *  @return
 */
- (NSString*)getTitle:(QLViewPager *)viewPager position:(int)position;

@end
